package explorer;

import java.awt.Graphics;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;


public class Elements extends Placer{

	

		
	
	private List<String> elements=new ArrayList<String>();
	Placer placer= new Placer();
	
	public Elements(Collection<String> elements){
			this.elements.addAll(elements);
		}	
	
	
	public void drawElements(Graphics graphics){
		int slotV,slotL;
		for (int j = 0; j < (elements.size()/5) ; j++) {
			
			slotL=j;
		
			for (int i = 0; i < 6; i++) {
			
				String data=elements.get(i+j*6);
				
				slotV=i;
				
				placer.place(graphics,data,slotV, slotL);
			}
		}
	}
}